﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace IOseralize.Exetend
{
  public   class AttributeExtend
    {
        public static string GetRemark(Enum Value)
        {
            Type type = Value.GetType();
    var filed =type.GetField(Value.ToString());
            if (filed.IsDefined(typeof(EnumAtt),true))
            {
                EnumAtt arr = (EnumAtt)filed.GetCustomAttribute(typeof(EnumAtt));
                return arr.Remark;
            }
            else
            {
                return Value.ToString(); 
            }
        }
    }
}
